package com.atgion.service.service.impl;

import com.atgion.service.mapper.UserAddressMapper;
import com.atgion.service.service.UserAddressService;
import com.atgion.spzx.model.entity.user.UserAddress;
import com.atgion.util.AuthContextUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserAddressServiceImpl implements UserAddressService {

    @Autowired
    private UserAddressMapper userAddressMapper ;

    @Override
    public List<UserAddress> findUserAddressList() {
        Long UserId = AuthContextUtil.getUserInfo().getId();
        List<UserAddress> userAddressList = userAddressMapper.findUserAddressList(UserId);
        return userAddressList;
    }

    @Override
    public UserAddress getById(Long id) {
        System.out.println(1);
        return userAddressMapper.getById(id);
    }
}
